<?php

use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMessageTemplatesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('message_templates', function (Blueprint $table) {
            $table->charset = 'utf8';
            $table->collation = 'utf8_general_ci';
            $table->comment = '后台消息模板表';
            $table->increments('id');
            $table->string('desc')->comment('说明');
            $table->string('title')->nullable()->comment('消息标题');
            $table->text('content')->comment('消息内容');
            $table->string('key_word')->nullable()->comment('关键字');
            $table->text('url')->comment('超链接');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('message_templates');
    }
}
